// 版权归 瞄你个汪 所有。使用本代码应遵守相关法律法规和Apache 2.0开源许可要求。
package top.geeke.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import top.geeke.entity.base.EntityBase;
import top.geeke.toolkit.supertable.annotation.SuperColumn;
import top.geeke.toolkit.supertable.annotation.SuperTable;

import java.io.Serializable;

/**
 * <p>
 * 系统在线用户表
 * </p>
 * @author 瞄你个汪
 * @since 2024-05-01 12:00:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_online_user")
@SuperTable(value = "系统在线用户表", isSystem = true)
public class SysOnlineUser extends EntityBase implements Serializable {
    private static final long serialVersionUID = 1L;

    @SuperColumn(value = "用户ID")
    private Long userId;

    @SuperColumn(value = "账号", length = 32)
    private String account;

    @SuperColumn(value = "姓名", nullable = true, length = 32)
    private String realName;

    @SuperColumn(value = "连接ID", nullable = true)
    private String connectionId;

    @SuperColumn(value = "连接时间(秒)", nullable = true)
    private long time;

    @SuperColumn(value = "连接IP", nullable = true)
    private String ip;

    @SuperColumn(value = "浏览器", nullable = true, length = 128)
    private String browser;

    @SuperColumn(value = "操作系统", nullable = true, length = 128)
    private String os;

    @JsonIgnore
    @JsonIgnoreProperties
    @TableField(exist = false)
    private SysUser user;
}
